<script lang="ts" setup>
import BaseImage from './BaseImage.vue';

interface Props {
  cur: EnumCurrencyKey
}

const props = withDefaults(defineProps<Props>(), {})

const iconUrl = computed(() => {
  return `/currency/${currencyConfig[props.cur]?.cur}.webp`
})
</script>

<template>
  <BaseImage :url="iconUrl" is-network
    style="width: var(--tg-base-currency-icon-width);height: var(--tg-base-currency-icon-width);" />
</template>

<style>
:root {
  --tg-base-currency-icon-width: 1rem;
}
</style>
